package edu.ecu.seng6270.goa.ropa;

/**
 * OrderItem Class -- Primary model / business logic class representing a single item within an order. 
 */
public class OrderItem {
	
	int mySize = 1;
	int myFinish = 1;
	int myPTime = 1;
	int myQuantity = 1;
	int myPhotoId = 1;
	
	public OrderItem() {
		
	}
	
	public OrderItem (int size, int finish, int ptime, int quantity, int photoid) {
		mySize = size;
		myFinish = finish;
		myPTime = ptime;
		myQuantity = quantity;
		myPhotoId = photoid;
		
	}

	public Boolean validateOrderItem() {
		if (mySize == 1 || mySize == 2 || mySize == 3) {
			if (myFinish == 1 || myFinish == 2) {
				if (myPTime == 1 || myPTime == 2) {
					if (myQuantity >= 1 && myQuantity <= 100) {
						return true;
					}
				}
			}
		}
		return false;
	}
	
	//////////////////////////////////////
	// Getters and setters				//
	//////////////////////////////////////
	
	public int getMySize() {
		return mySize;
	}
	public void setMySize(int mySize) {
		this.mySize = mySize;
	}
	public int getMyFinish() {
		return myFinish;
	}
	public void setMyFinish(int myFinish) {
		this.myFinish = myFinish;
	}
	public int getMyPTime() {
		return myPTime;
	}
	public void setMyPTime(int myPTime) {
		this.myPTime = myPTime;
	}
	public int getMyQuantity() {
		return myQuantity;
	}
	public void setMyQuantity(int myQuantity) {
		this.myQuantity = myQuantity;
	}

	public int getMyPhotoId() {
		return myPhotoId;
	}

	public void setMyPhotoId(int myPhotoId) {
		this.myPhotoId = myPhotoId;
	}
	

}
